#!/bin/bash

prefix="pro-"
# 项目名称
project_name="ufi-"

function mi-tag() {
    git push
    git pull --tags
    local new_tag=$(echo ${prefix}${project_name}$(date +'%Y%m%d')-$(git tag -l "${prefix}${project_name}$(date +'%Y%m%d')-*" | wc -l | xargs printf '%02d'))
    echo ${new_tag}
    git tag ${new_tag}
    git push origin $new_tag
    echo "End $(date +'%Y-%m-%d %H:%M:%S')"
}
mi-tag;